package com.pei.util;

import org.apache.commons.io.IOUtils;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;

public class JSONFileUtils {
    public static String readFile(String filepath) throws Exception{
        FileInputStream fis = new FileInputStream(filepath);
        return IOUtils.toString(fis);
    }

    public static void writeFile(String data,String fillpath) throws  Exception{
        FileOutputStream fos = new FileOutputStream(fillpath);
        IOUtils.write(data,fos);
    }
}
